//2710.移除字符串中的尾随零
//https://leetcode.cn/problems/remove-trailing-zeros-from-a-string
class Solution {
public:
    string removeTrailingZeros(string num) {
        int i = num.size()-1;
        while(num.size() && num[i] == '0') --i;
        return num.substr(0,i+1);
    }
};